package cn.itcast.item.interceptor;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

@Component
public class SpringMvcSupport extends WebMvcConfigurationSupport {
    //TODO
    @Autowired
    private myHandlerIntercept han;

    @Override
    protected void addInterceptors(InterceptorRegistry registry) {
        //TODO: 配置拦截器
        registry.addInterceptor(han).addPathPatterns("/**");
    }
}
